//
//  RequestService.m
//  UI
//
//  Created by apple on 2017/7/6.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "RequestService.h"

@implementation RequestService

+ (void)requestSuccess:(void (^)(id))success Failed:(void (^)(id))failed{

    NSString *st = @"http://mappv5.caixin.com/index_page_v5/index_page_1.json?";
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    
    manager.responseSerializer = [AFJSONResponseSerializer serializer];
    
    [manager GET:st parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
       
        success(responseObject);
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        
    }];
}

@end
